home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / docs / howto / X11R3_colors < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.2 KB  |  26 lines

  1. Did you ever wonder what this brownish red-orange color is actually called?
  2. Well, a look in /X11R3/lib/rgb/rgb.txt will answer that!
  3.  
  4. When you specify a color, you may either use a name in the rgb database for
  5. which the human-readable source is in the file mentioned above, or you
  6. may give the RGB value using #RGB or #RRGGBB or #RRRRGGGGBBBB (where "#" is
  7. that character, "R", "G" and "B" refer to the red, gree and blue values in
  8. hexadecimal. #RGB specifies the 4 most significant bits of each color gun,
  9. #RRGGBB the 8 msb and the last form the 16 msb [useless on our 8-bit
  10. color machines]).
  11.  
  12. Color defaults:
  13. If you load your defaults file into the server using xrdb, it is passed
  14. thru cpp. One interesting feature is that COLOR is only defined on color
  15. displays, thus you can conditionally set colors by enclosing the
  16. definitions in "#ifdef COLOR" and "#endif". For more info, please read
  17. the xrdb manual page.
  18.  
  19. Colors on black/white machines:
  20. You might wonder what happens with colors on b/w displays! Well, the rgb
  21. values are mapped into grey using:
  22.     %grey = %red * .39 + %green * .50 + %blue * .11
  23. which is then converted to black/white using a 50% threshold.
  24.  
  25.                 -Thorsten (tve@sprite.berkeley.edu)
  26.